﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace TripleGameService
{
    public class PlayerDTO
    {
        public int Id { get; set; }
        public string Name { get; set; }

        public static PlayerDTO CreateFromUser(Player player) 
        {
            PlayerDTO newPlayer = new PlayerDTO();
            newPlayer.Id = player.PlayerId;
            newPlayer.Name = player.PlayerName;
            return newPlayer;
        }

        public Player ConverToPlayer() 
        {
            Player newPlayer = new Player();
            newPlayer.PlayerId = this.Id;
            newPlayer.PlayerName = this.Name;
            return newPlayer;
        }
    }
}